﻿<%@ Page Language="C#" MasterPageFile="~/Masterlayout.master" AutoEventWireup="true" CodeFile="Employees.aspx.cs" Inherits="Employees" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 357px;
        }
     .tb5 {
	        border:2px solid #456879;
	        border-radius:10px;
	        
             margin-left: 0px;
            
          }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        <table border="0" cellpadding="1" cellspacing="1" style="width: 100%; margin-left:40px">
                <tr>
                    <td class="style1" valign="baseline">
                        <table border="0" cellpadding="1" cellspacing="1" width=100%" frame="border">
                            <tr>
                                <td>
                                    Employee ID:
                                </td>
                                <td>

                                    <asp:TextBox ID="txtID" runat="server" class="tb5" ReadOnly="True">
                                    </asp:TextBox>

                                   
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Last Name:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtLastname" runat="server" class="tb5"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                        ControlToValidate="txtLastname" Display="Dynamic" 
                                        ErrorMessage="Cannot be empty!"></asp:RequiredFieldValidator>
                                </td>
                                    
                            </tr>
                            <tr>
                                <td>
                                    First Name:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtFirstname" runat="server" class="tb5"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                        ControlToValidate="txtFirstname" Display="Dynamic" 
                                        ErrorMessage="Cannot be empty!"></asp:RequiredFieldValidator>
                                </td>
                                    
                            </tr>
                            <tr>
                                <td>
                                    Title:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtTitle" runat="server" class="tb5"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                        ControlToValidate="txtTitle" Display="Dynamic" ErrorMessage="Cannot be empty!"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Title of Courtesy:
                                </td>
                                <td>
                                    <asp:dropdownlist ID="cbTOC" runat="server" Width="148px" class="tb5">
                                        <asp:ListItem>Dr.</asp:ListItem>
                                        <asp:ListItem>Mr.</asp:ListItem>
                                        <asp:ListItem>Mrs.</asp:ListItem>
                                        <asp:ListItem>Ms.</asp:ListItem>
                                    </asp:dropdownlist>
                                </td>
                            </tr>        
                            <tr>
                                <td>
                                    Birth Date:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtBirthdate" NAME="txtBirthdate"
                                    runat="server" class="tb5"></asp:TextBox>
                                    <%--<A HREF="#" onClick="cal.select(document.forms['form1'].ctl00_ContentPlaceHolder1_txtBirthdate,'anchor1','dd/MM/yyyy'); return false;"
                                    NAME="anchor1" ID="anchor1">select</A>--%>
                                    <input id="dtBirth" type="date" onchange="getBirth()" class="tb5"></input>
                                    <asp:RequiredFieldValidator 
                                        ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtBirthdate" 
                                        Display="Dynamic" ErrorMessage="Cannot be empty!"></asp:RequiredFieldValidator>

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Hire Date:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtHiredate" NAME="txtHiredate"
                                    runat="server" class="tb5"></asp:TextBox>
                                    <%--<A HREF="#" onClick="cal.select(document.forms['form1'].txtHiredate,'anchor2','dd/MM/yyyy'); return false;"

                                    NAME="anchor2" ID="anchor2">select</A>--%>
                                    
                                    <input id="dtHire" type="date" onchange="getHire()" class="tb5"></input>
                                    <asp:RequiredFieldValidator 
                                        ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtHiredate" 
                                        Display="Dynamic" ErrorMessage="Cannot be empty!"></asp:RequiredFieldValidator>


                                </td>
                            </tr>
                             <tr>
                                <td>
                                    Address:
                                </td>
                                <td>
                                    <asp:textbox ID="txtAddress" runat="server" Height="93px"
                                    TextMode="MultiLine" Width="145px" class="tb5"></asp:textbox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                                        ControlToValidate="txtAddress" Display="Dynamic" 
                                        ErrorMessage="Cannot be empty!"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    City:
                                </td>
                                <td>
                                    <asp:dropdownlist ID="cbCity" runat="server" Width="148px" class="tb5">
                                        <asp:ListItem>Seattle</asp:ListItem>
                                        <asp:ListItem>Tacoma</asp:ListItem>
                                        <asp:ListItem>Kirkland</asp:ListItem>
                                        <asp:ListItem>Redmond</asp:ListItem>
                                        <asp:ListItem>NewYork</asp:ListItem>
                                        <asp:ListItem>Wasington DC</asp:ListItem>
                                        <asp:ListItem>London</asp:ListItem>
                                        <asp:ListItem>Hanoi</asp:ListItem>
                                        <asp:ListItem>Saigon</asp:ListItem>
                                        <asp:ListItem>Tokyo</asp:ListItem>
                                        <asp:ListItem>Singapore</asp:ListItem>
                                        <asp:ListItem>Ottawa</asp:ListItem>
                                    </asp:dropdownlist>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Region:
                                </td>
                                <td>
                                    <asp:dropdownlist ID="cbRegion" runat="server" Width="148px" class="tb5">
                                        <asp:ListItem>WA</asp:ListItem>
                                        <asp:ListItem>SA</asp:ListItem>
                                        <asp:ListItem>Asia</asp:ListItem>
                                        <asp:ListItem>Europe</asp:ListItem>
                                    </asp:dropdownlist>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Postal Code:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtPostalCode" runat="server" class="tb5"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Country:
                                </td>
                                <td>
                                    <asp:dropdownlist ID="cbCountry" runat="server" Width="148px" class="tb5">
                                        <asp:ListItem>USA</asp:ListItem>
                                        <asp:ListItem>UK</asp:ListItem>
                                        <asp:ListItem>Vietnam</asp:ListItem>
                                        <asp:ListItem>Japan</asp:ListItem>
                                        <asp:ListItem>Singapore</asp:ListItem>
                                        <asp:ListItem>Canada</asp:ListItem>
                                    </asp:dropdownlist>
                                </td>
                            </tr>                             
                            <tr>
                                <td>
                                    Phone:
                                </td>
                                <td>
                                    <asp:textbox ID="txtPhone" runat="server" class="tb5">
                                    </asp:textbox>
                                    <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                        ControlToValidate="txtPhone" Display="Dynamic" ErrorMessage="must be number" 
                                        Operator="GreaterThanEqual" Type="Integer" ValueToCompare="0"></asp:CompareValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Manager ID:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtMgrid" runat="server" class="tb5"></asp:TextBox>
                                    <%--<asp:CompareValidator ID="CompareValidator2" runat="server" 
                                        ControlToValidate="txtMgrid" Display="Dynamic" ErrorMessage="must be number" 
                                        Operator="GreaterThanEqual" Type="Integer" ValueToCompare="0"></asp:CompareValidator>--%>
                                </td>
                            </tr>
                            
                            <tr>
                                <td colspan="2">
                                    <asp:button ID="btnNew" runat="server" text="New" 
                                    Width="65px" CausesValidation="False" onclick="btnNew_Click" class="tb5"/>
                                    <asp:button ID="btnAdd" runat="server" text="Add" 
                                    Width="65px" onclick="btnAdd_Click" class="tb5"/>
                                    <asp:button ID="btnUpdate" runat="server" text="Update" 
                                        onclick="btnUpdate_Click" class="tb5"/>
                                    <asp:button ID="btnDelete" runat="server" text="Delete" 
                                        onclick="btnDelete_Click" onclientclick="return confirm('Are you sure?')" class="tb5"/>
                                    <asp:button ID="btnReload" runat="server" text="Reload" 
                                    Width="65px" CausesValidation="False" onclick="btnReload_Click" class="tb5"/>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <tr>
                    <td>
                        <table >
                            <tr>
                               <td >
                                   Search by name: 
                               
                                   <asp:textbox ID="txtSearch" runat="server" class="tb5">
                                   </asp:textbox> 
                               
                                   <asp:button ID="btnSearch" runat="server" text="Search" 
                                       onclick="btnSearch_Click" CausesValidation="False" class="tb5"/>
                               </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:GridView ID="gvEmployees" runat="server" onload="gvEmployees_Load" style="width:900px"
                                  onselectedindexchanged="gvEmployees_SelectedIndexChanged" 
                                onpageindexchanging="gvEmployees_PageIndexChanging"
                                BackColor="White"
                                ForeColor="Black"
                                 SelectedRowStyle-ForeColor="White"
                                > 
                                
                                <HeaderStyle BackColor="Orange" />
                                 <EditRowStyle ForeColor="Black" />
                                 <AlternatingRowStyle BackColor="DarkGray" />
                                 <SelectedRowStyle BackColor="BlueViolet" />
                                </asp:GridView>
                                </td>
                            </tr>
                            </table>
                    </td>
                    </tr>
                </tr>
            </table>
    </div>
    
</asp:Content>